//接口模块化 Router.use()
const express = require("express");
const router = express.Router();
//相当于后台的路由，所有的后台处理都需要从这里经过
var myCenter = require("./myCenter");
var userRouters = require("./userRouters");
const middlewareFnTest1 = (req, res, next) => {
  console.log("中间件1触发了")
  next()
}
const middlewareFnTest2 = (req, res, next) => {
  console.log("中间件2触发了")
  //测试一下是否是按顺序执行
  next()
}
router.use("/myCenter/",[middlewareFnTest1,middlewareFnTest2],myCenter);
router.use("/routers/", userRouters);
module.exports = router;